#pragma once

// common header
#include "stdafx.h"

class NodeEnumerator
{
private:
	FILE        * _output;
	int           _tabLevel;
	std::string   _basePath;
	std::string   _sceneName;
private:
	void writeTabs(int level = -1);
	void writeString(const std::string & string, int level = -1);
	void parseMaterial(size_t trianglesCount, IGameMaterial * material);
	void parseMesh(const std::string & path, IGameMesh * mesh, IGameMaterial * masterMaterial, Matrix3 globalMatrix);
	void writeDefaultMaterial(size_t trianglesCount);
	void parseTexture(IGameTextureMap * texture);
public:
	NodeEnumerator(FILE * output, const char * basePath, const char * sceneName);
	~NodeEnumerator();
	int parseNode(IGameNode * node);
};